import java.util.Scanner;


public class Solution {


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String str4 = setstring(str);
        System.out.println(str4);
    }
    public  static String setstring (String str) {
        // write code here
        char[] str1 = str.toCharArray();
        String str2 = new String(str1);
        for (int i = 0; i < str1.length; i++) {
            int flag = 0;
            for (int j = 0; j < str2.length(); j++) {
                if (str2.indexOf(str.charAt(i))==-1) {//indexOf找不到字符就返回-1
                    flag++;
                }
            }
            if(flag==1){
                str2+=str1[i];
            }
        }
        return str2;
    }
}